/**
 * @(#)ThirdSmsConfig.java 2017年8月2日
 * Copyright(C) 2017 ZHEXIN IT CO.,LTD. All rights reserved.
 */
package org.jsbd.boss.domian.channel;

import java.io.Serializable;
import java.util.Date;

import com.alibaba.fastjson.JSONObject;
import org.jsbd.boss.common.DataGridModel;
import org.jsbd.boss.enums.SmsTaskTypeEnum;
import org.springframework.format.annotation.DateTimeFormat;

import com.fasterxml.jackson.annotation.JsonFormat;

/**
 * TODO 请加入本类的说明
 * 
 * @author <a href="mailto:xupengcheng@zhexinit.com" >徐鹏程</a>
 * @version 1.0.0
 */
public class ThirdSmsConfig extends DataGridModel{

	/**
	 * serialVersionUID TODO 请描述这个变量的含义
	 */
	private static final long serialVersionUID = 1L;
	private Integer id;
	private String name;
	private String code;
	private Integer smsId;
	private Integer isUseful;
	private Date createTime;
	private Date modifyTime;
	private String carrier;
	private String channelName;
	private String filterChannel;

	private String phoneNum;
	private String msgContent;
	private String remark;
	private String messageContent;
	private String regexContent;
	private String needSendBackSMS;
	private String callbackUrl;

	private Integer taskType;
	private Integer taskNum;
	private String sendSms;
	private String sendPhoneNum;
	private String viewTaskNum;
	private String viewTaskType;

	public Integer getId() {
		return id;
	}

	public void setId(Integer id) {
		this.id = id;
	}

	public String getName() {
		return name;
	}

	public void setName(String name) {
		this.name = name;
	}

	public String getCode() {
		return code;
	}

	public void setCode(String code) {
		this.code = code;
	}

	public Integer getSmsId() {
		return smsId;
	}

	public void setSmsId(Integer smsId) {
		this.smsId = smsId;
	}

	public Integer getIsUseful() {
		return isUseful;
	}

	public void setIsUseful(Integer isUseful) {
		this.isUseful = isUseful;
	}

	@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
	@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
	public Date getCreateTime() {
		return createTime;
	}

	public void setCreateTime(Date createTime) {
		this.createTime = createTime;
	}

	@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
	@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
	public Date getModifyTime() {
		return modifyTime;
	}

	public void setModifyTime(Date modifyTime) {
		this.modifyTime = modifyTime;
	}

	public String getPhoneNum() {
		return phoneNum;
	}

	public void setPhoneNum(String phoneNum) {
		this.phoneNum = phoneNum;
	}

	public String getMsgContent() {
		return msgContent;
	}

	public void setMsgContent(String msgContent) {
		this.msgContent = msgContent;
	}

	public String getRemark() {
		return remark;
	}

	public void setRemark(String remark) {
		this.remark = remark;
	}

	public String getMessageContent() {
		return messageContent;
	}

	public void setMessageContent(String messageContent) {
		this.messageContent = messageContent;
	}

	public String getRegexContent() {
		return regexContent;
	}

	public void setRegexContent(String regexContent) {
		this.regexContent = regexContent;
	}

	public String getNeedSendBackSMS() {
		return needSendBackSMS;
	}

	public void setNeedSendBackSMS(String needSendBackSMS) {
		this.needSendBackSMS = needSendBackSMS;
	}

	public String getCallbackUrl() {
		return callbackUrl;
	}

	public void setCallbackUrl(String callbackUrl) {
		this.callbackUrl = callbackUrl;
	}

	public Integer getTaskType() {
		return taskType;
	}

	public void setTaskType(Integer taskType) {
		this.taskType = taskType;
	}

	public Integer getTaskNum() {
		return taskNum;
	}

	public void setTaskNum(Integer taskNum) {
		this.taskNum = taskNum;
	}

	public String getSendSms() {
		return sendSms;
	}

	public void setSendSms(String sendSms) {
		this.sendSms = sendSms;
	}

	public static long getSerialversionuid() {
		return serialVersionUID;
	}

	public String getSendPhoneNum() {
		return sendPhoneNum;
	}

	public void setSendPhoneNum(String sendPhoneNum) {
		this.sendPhoneNum = sendPhoneNum;
	}

	public String getViewTaskNum() {
		return viewTaskNum;
	}

	public void setViewTaskNum(String viewTaskNum) {
		this.viewTaskNum = viewTaskNum;
	}

	public String getViewTaskType() {
		if (taskType != null) {
			viewTaskType = SmsTaskTypeEnum.valueOf(taskType).getName();
		}
		return viewTaskType;
	}

	public void setViewTaskType(String viewTaskType) {
		this.viewTaskType = viewTaskType;
	}

	public String getCarrier() {
		return carrier;
	}

	public void setCarrier(String carrier) {
		this.carrier = carrier;
	}

	public String getChannelName() {
		return channelName;
	}

	public void setChannelName(String channelName) {
		this.channelName = channelName;
	}

	public String getFilterChannel() {
		return filterChannel;
	}

	public void setFilterChannel(String filterChannel) {
		this.filterChannel = filterChannel;
	}

	@Override
	public String toString() {
		return JSONObject.toJSONString(this);
	}
}
